<%--
  Created by IntelliJ IDEA.
  User: 甲乙饼叮叮
  Date: 2019/10/4
  Time: 15:55
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>个人中心</title>
    <link rel="Shortcut Icon" href="../imgs/Kat-icon.png">
    <!-- 引入bootstrap框架的样式文件 -->
    <link rel="stylesheet" href="../plugins/bootstrap/css/bootstrap.css" type="text/css">
    <link rel="stylesheet" href="../css/head.css">
    <link rel="stylesheet" href="../css/alert.css">
    <link rel="stylesheet" href="../css/change.css">
    <link rel="stylesheet" href="../css/droppicker.min.css">
</head>

<body>
<!-- 导航开始 -->
<%@ include file="../nav/nav.jsp"%>
<!-- 导航结束 -->
<!-- 个人中心视图 -->
<div class="personal" style="height: 450px; width: 70%;">
    <form class="form-horizontal" name="form" action="<%=request.getContextPath()%>/personal/upd?Oid=${orderVos.id}" method="post" onsubmit="return checkSub()">
        <div>
            <div class="leftlist"><br>
                <input type="hidden" id="fid" value="${regOffice.firstdepartmentId}">
                <input type="hidden" id="sid" value="${regOffice.seconddepartmentsId}">
                <input type="hidden" id="did" value="${regOffice.doctorId}">
                <input type="hidden" id="tid" value="${regOffice.timeId}">

                <div id="content">

                </div>
            </div>
            <div class="rightlist">
                <div class="details" style="float:left;">
                    <div class="texts">
                        <h4><b>温馨提示:</b></h4>
                        <span style="padding-left:33px;">更改科室如果挂号费用与原挂号费用相同则不需要再次支付挂号费</span><br>
                        <span>用,挂号费用有变化需要再次发起支付,原挂号费用将全部退回到您付</span><br>
                        <span>款方式的钱包中,退款将在3个工作日内退还,若有支付问题请反馈。</span>
                    </div>
                </div>
                <hr>
                <hr>
                <div class="details">
                    <span><b>就诊人:</b></span>
                    <span>${userinfo.uname}</span><br>
                    <span><b>身份证号:</b></span>
                    <span>${userinfo.idcard}</span><br>
                    <span><b>手机号:</b></span>
                    <span>${orderVos.patientTel}</span><br>
                </div>
            </div>
        </div>
        <div style="clear: both;"></div>
        <hr style="margin-top: 0">
        <div style="margin-left: 20px;float: left">
            <span>原挂号费用:</span>
            <span class="glyphicon glyphicon-yen" style="color: rgb(5, 160, 80)">${orderVos.regPrice}</span><br><br>
            <span>该科室挂号费用:</span>
            <span class="glyphicon glyphicon-yen" style="color: rgb(5, 160, 80)">20.00</span><br>
        </div>
        <div class="details" style="float:right;margin-right:50px;margin-left: 0px">
            <c:if test="${orderVos.regStatus == 0}">
                <span><button class="alert-api-button alert-btn4" style="color:white;" type="button"><small>确认修改</small></button></span>
            </c:if>
        </div>
    </form>
    <div class="details" style="float:right;margin-right:50px;margin-left: 0px">
        <c:if test="${orderVos.regStatus == 3}">
            <span><button class="alert-api-button alert-btn1" style="color:white; background-color: grey;border-color: grey;"><small>修改次数用尽</small></button></span>
        </c:if>
    </div>
    <div class="details" style="float:right;">
        <span><a href="${pageContext.request.contextPath}/personal/order"><button style="color:white;"><small>取消修改</small></button></a></span>&nbsp;&nbsp;&nbsp;
    </div>

</div>
<div style="height: 50px"></div>

<%@ include file="../nav/foot.jsp"%>

<!-- bootstrap中的js插件依赖于jquery框架,所以必须先引入jquery的js文件 -->
<script src="../plugins/jquery/jquery.min.js"></script>
<!--引入bootstrap的js文件-->
<script src="../plugins/bootstrap/js/bootstrap.js"></script>
<!-- 引入四级联动js -->
<script src="../js/droppicker.min.js"></script>
<!-- 引入alert的js文件 -->
<script src='../js/alert.js'></script>
<script src="../js/option.js"></script>
<script>
    var M = {}
    // 按钮四
    $(document).delegate(".alert-btn4", 'click', function () {
        if (M.dialog4) {
            return M.dialog4.show();
        }
        M.dialog4 = jqueryAlert({
            'title': '知医治',
            'content': '确定修改科室信息<br>更改后该订单不可再次变更<br>确认修改将跳往支付页面',
            'modal': true,
            'animateType': '',
            'buttons': {
                '返回': function () {
                    M.dialog4.close();
                },
                '确认': function () {
                    if (M.dialog41) {
                        return M.dialog41.show();
                    }
                    M.dialog41 = jqueryAlert({
                        'content': '修改成功'
                    })
                    function ok() {
//                        document.form.action = ""
                        document.form.submit();
// window.location.href = 'order.html';
                    }
                    setTimeout(ok, 1500);


                }
            }
        })
    })
</script>
<script>
    var M = {}
    $(document).delegate(".alert-btn1", 'click', function () {
        if (M.dialog1) {
            return M.dialog1.show();
        }
        M.dialog1 = jqueryAlert({
            'content': '修改次数已用尽,如有需要请退号',
            'closeTime': 5000,
        })
    })
</script>
<script>

    $(function(){
        var fid = document.getElementById("fid").value;
        var sid = document.getElementById("sid").value;
        var did = document.getElementById("did").value;
        var tid = document.getElementById("tid").value;


        $("#content").load("/treatment/personal/option",{fid:fid,sid:sid,did:did,tid:tid});
    });
</script>


</body>

</html>
